//
//  PicTableViewCell.m
//  iNews
//
//  Created by lanou3g on 14-12-16.
//  Copyright (c) 2014年 张在青. All rights reserved.
//

#import "PicTableViewCell.h"

@implementation PicTableViewCell

- (void)dealloc
{
    [_imV release];
    [_lab release];
    [_numLab release];
    
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self addAllViews];
        
    }
    return self;
}


- (void)addAllViews
{
    self.imV = [[[UIImageView alloc] initWithFrame:CGRectMake(10, 5, [UIScreen mainScreen].bounds.size.width - 20, 150)] autorelease];
    self.imV.backgroundColor = [UIColor grayColor];
    [self addSubview:self.imV];
    
    self.lab = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMinX(self.imV.frame), CGRectGetMaxY(self.imV.frame), CGRectGetWidth(self.imV.frame) - 60, 20)] autorelease];
  //  self.lab.backgroundColor = [UIColor redColor];
    self.lab.font = [UIFont systemFontOfSize:12];
    [self addSubview:self.lab];
    
    self.numLab = [[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.lab.frame), CGRectGetMinY(self.lab.frame), CGRectGetWidth(self.imV.frame) - CGRectGetWidth(self.lab.frame), CGRectGetHeight(self.lab.frame))] autorelease];
    self.numLab.textAlignment = NSTextAlignmentCenter;
    self.numLab.font = [UIFont systemFontOfSize:8];
  //  self.numLab.backgroundColor = [UIColor orangeColor];
    [self addSubview:self.numLab];
    
    
    
}





- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
